package com.paic.mhis.hcpms.audit.biz.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.paic.mhis.core.auth.biz.service.UserDetails;
import com.paic.mhis.hcpms.audit.dto.AuditOpinionDTO;

/**
 * 
 * @author EX-LUORONG001
 * 
 */
public interface AuditOpinionService {

	Map<String, Object> getOpinionList(AuditOpinionDTO opinionDTO,
			String type1, String type2);

	public Map<String, Object> loadOpinionProjectList(
			AuditOpinionDTO opinionDTO, String type1, String type2,
			String type, String flag, String userName, boolean state);

	Map<String, Object> addOpinion(AuditOpinionDTO opinionDTO);

	Map<String, Object> getOpinion(AuditOpinionDTO opinionDTO);

	void updateOpinion(AuditOpinionDTO opinionDTO);

	AuditOpinionDTO getAuditOpinion(AuditOpinionDTO opinionDTO);

	/**
	 * 处理事件调查审核
	 * 
	 * @param opinionDTO
	 */
	public Map<String, Object> processProblemAudit(AuditOpinionDTO opinionDTO,
			JSONObject transferJson, String userName, UserDetails user,
			Map<String, Object> map) throws Exception;

	/**
	 * 批量提交（案件复核）
	 * 
	 * @param opinionDTO
	 * @param user
	 * @param map
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> updateBatchCase(AuditOpinionDTO opinionDTO,
			UserDetails user, Map<String, Object> map) throws Exception;

	/**
	 * 事件调查复核
	 * 
	 * @param opinionDTO
	 */
	public Map<String, Object> processBackProblemReview(
			AuditOpinionDTO opinionDTO, JSONObject transferJson,
			String userName, UserDetails user, Map<String, Object> map)
			throws Exception;

	/**
	 * 案件稽核待复核
	 * 
	 * @param opinionDTO
	 */
	public Map<String, Object> processCaseReview(AuditOpinionDTO opinionDTO,
			JSONObject transferJson, UserDetails user, Map<String, Object> map)
			throws Exception;

	/**
	 * 查询意见实体对象
	 * 
	 * @param opinionDTO
	 * @return
	 */
	public AuditOpinionDTO queryAuditOpinionDTO(AuditOpinionDTO opinionDTO);

	/**
	 * 案件 审批岗位 暂存或是提交 onlySave 去判断
	 * 
	 * @param opinionDTO
	 * @return
	 */
	Map<String, Object> approvementAuditOpinion(AuditOpinionDTO opinionDTO,
			UserDetails user, Map<String, Object> map) throws Exception;

	/**
	 * 案件审批岗位 批量审批 提交 
	 * @param caseCodes 批量审批id 
	 * 
	 */
	Map<String, Object> approvementAudits(AuditOpinionDTO opinionDTO,
			UserDetails user, Map<String, Object> map, String[] caseCodes)
			throws Exception;

	/**
	 * 事件 审批岗位 暂存或是提交 onlySave 去判断
	 * 
	 * @param opinionDTO
	 * @return
	 */
	Map<String, Object> approvementProblemOpinion(AuditOpinionDTO opinionDTO,
			JSONObject transferJson, UserDetails user, Map<String, Object> map)
			throws Exception;

	/**
	 * 查询所有意见信息至前台
	 * 
	 * @param AuditOpinionDTO
	 * @return
	 */
	List<AuditOpinionDTO> queryAllOpinion(AuditOpinionDTO opinionDTO,
			UserDetails user, String caseCode, String problemNo);

	/**
	 * 根据意见类型，查询对应的意见（事件意见或者案件意见）
	 * 
	 * @param opinionDTO
	 * @return
	 */
	public AuditOpinionDTO getOpinionByType(AuditOpinionDTO opinionDTO);

	/**
	 * 批量操作（调查）
	 * 
	 * @param vo
	 * @param request
	 * @return
	 * @throws IOException
	 * @throws Exception
	 */
	public Map<String, Object> onBatchOperateDcServ(String[] problemNos,
			UserDetails user, Map<String, Object> result) throws Exception;

	/**
	 * 事件调查复核
	 * **/
	public Map<String, Object> onBatchOperateReviewServ(String[] problemNos,
			AuditOpinionDTO opinionDTO, UserDetails user,
			Map<String, Object> result) throws Exception;
	/**
	 * 流程流转情况详情展示
	 * **/
	public Map<String, Object> showWFHistory(String problemNos,
			Map<String, Object> result) throws Exception;
	/**
	 *  流程流转情况详情展示
	 * **/
	public Map<String, Object> showWFCaseHistory(String caseCode,String problemNo,
			Map<String, Object> result) throws Exception;
}
